package weaver.formmode.customjavacode.modeexpand.holyview.utils;

import weaver.conn.RecordSet;
import weaver.general.Util;

/**
 * @Title: ecology-idea
 * @Company: Weaver soft
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2022-07-28
 * @Description: ${description}
 * @ModifyLog:
 **/

public class HolyviewUtil {
    /**
     *@Description:
     *@Param: []
     *@return: java.lang.String
     *@Author: Dusongsong
     *@Date: 2022/7/28
     */
    public static String getMaxIdByHrm(){
        RecordSet rs = new RecordSet(  );
        rs.executeQuery("select (max(id)+1) from hrmresource where 1=1");
        rs.next();
        return Util.null2String(rs.getString(1));
    }
    /**
     *@Description:
     *@Param: [loginid]
     *@return: boolean
     *@Author: Dusongsong
     *@Date: 2022/7/28
     */
    public static String hasRepeatByHrm(String loginid){
        RecordSet rs = new RecordSet(  );
        rs.executeQuery("select id from hrmresource where loginid=?",loginid);
        rs.next();
        return Util.null2String(rs.getString(1));
    }

}
